import { translateTitle } from '@/utils/i18n'
const ErrorCodeInformationMaintenance = {
  ErrorCodeInformationMaintenance: {
    search: {
      form: {
        method: 'dams.errcode.query',
        name: 'search',
        field: [
          {
            type: 'input',
            name: 'ERROR_CODE',
            label: translateTitle('Dams.ApplicationInterface.错误代码'),
            labelHidden: false,
          },
          {
            type: 'input',
            name: 'ERROR_DESC',
            label: translateTitle('Dams.ApplicationInterface.错误代码描述'),
            labelHidden: false,
          },
          {
            type: 'select',
            name: 'SUB_SYSTEM',
            label: translateTitle('Dams.ApplicationInterface.所属子系统'),
            options: [],
            filterable: true,
          },
          {
            type: 'button',
            label: translateTitle('Dams.ApplicationInterface.查询'),
            labelHidden: true,
          },
        ],
      },
    },
    dialog: {
      form: {
        method: '',
        name: 'dialog',
        field: [
          {
            type: 'input',
            name: 'ERROR_CODE',
            label: translateTitle('Dams.ApplicationInterface.错误代码'),
            isRules: true,
            regExp: '^[SFE][0-9]{4}$',
            rulesHint: translateTitle('Dams.ApplicationInterface.请输入以的格式'),
          },
          {
            type: 'input',
            name: 'ERROR_DESC',
            label: translateTitle('Dams.ApplicationInterface.错误代码描述'),
            isRules: true,
          },
          {
            type: 'select',
            name: 'GROUP_NAME',
            label: translateTitle('Dams.ApplicationInterface.错误组名'),
            isMultiple: true,
            options: [],
            filterable: true,
            isRules: true,
          },
          {
            type: 'select',
            name: 'LANGUAGE_CODE',
            label: translateTitle('Dams.ApplicationInterface.语言'),
            options: [],
            isRules: true,
          },
          {
            type: 'select',
            name: 'TYPE',
            label: translateTitle('Dams.ApplicationInterface.错误代码类型'),
            options: [
              {
                LABEL: 'S',
                CODE: 'S',
              },
              {
                LABEL: 'F',
                CODE: 'F',
              },
              {
                LABEL: 'E',
                CODE: 'E',
              },
            ],
            isRules: true,
          },

          {
            type: 'input',
            name: 'ADD_USER_NAME',
            label: translateTitle('Dams.ApplicationInterface.添加人'),
            hidden: true,
            disabled_edit: true,
          },
          {
            type: 'input',
            name: 'EDIT_DATE_TIME',
            label: translateTitle('Dams.ApplicationInterface.编辑时间'),
            hidden: true,
            disabled_edit: true,
          },
          {
            type: 'input',
            name: 'EDIT_USER_NAME',
            label: translateTitle('Dams.ApplicationInterface.编辑人'),
            hidden: true,
            disabled_edit: true,
          },
          {
            type: 'input',
            name: 'ADD_DATE_TIME',
            label: translateTitle('Dams.ApplicationInterface.新增时间'),
            hidden: true,
            disabled_edit: true,
          },
          {
            type: 'select',
            name: 'SUB_SYSTEM',
            label: translateTitle('Dams.ApplicationInterface.所属子系统'),
            options: [],
            filterable: true,
            isRules: true,
          },
          {
            type: 'button',
            label: translateTitle('Dams.ApplicationInterface.提交'),
            labelHidden: true,
          },
        ],
      },
    },
    addMethod: 'dams.errcode.add',
    updateMethod: 'dams.errcode.edit',
    deleteMethod: 'dams.errcode.delete',
  },
}
export default ErrorCodeInformationMaintenance
